package com.yihu.cms.action;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yihu.cms.service.MaterialService;

@Controller
public class MaterialController extends BaseController{
	
protected final Logger log = LoggerFactory.getLogger(this.getClass());
	
	@RequestMapping(value = "/material/listAll", method = RequestMethod.GET)
	public @ResponseBody Map<String, Object> getArtworkPaging() {
		// required=false表示不传的话，会给参数赋值为null，required=true就是必须要有
		// 下面的对传入参数指定为keyword，如果前端不传keyword参数名，会报错
		log.info("get all artwork author list info .");
		MaterialService mhs = new MaterialService();
		return getResult(0, mhs.getAll());
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
